package com.b2.service;

import com.aliyun.oss.model.PartETag;
import com.b2.pojo.dto.MergeDto;
import com.b2.pojo.entity.Video;
import com.b2.result.Result;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.ExecutionException;

/**
* @author 悦神
* @description 针对表【video】的数据库操作Service
* @createDate 2024-04-25 16:05:17
*/
public interface VideoService extends IService<Video> {

    void delete(Long videoId);

    // Result<Boolean> checkChunk(MultipartUploadDto multipartUploadDto);

    Result<List<Video>> listAll(Long courseId);

    Result<Boolean> checkFile(String fileMd5, String fileName);

    Result<String> uploadId(String fileMd5, String fileName);

    Result<String> uploadChunk(MultipartFile file, String fileMd5, String fileName, int chunkIndex, String uploadId) throws IOException, ExecutionException, InterruptedException;

    Result<String> mergeChunks(MergeDto mergeDto);
}
